package dq.study.designmodel.proxy.statics;

import dq.study.designmodel.proxy.Moving;

/**
 * 静态代理---聚合方式
 *
 * @author dongqun
 * @since 2019/3/30 22:30
 */
public class AggregateProxyTank implements Moving {
    @Override
    public void move() {
        long start = System.currentTimeMillis();
        moving.move();
        long end = System.currentTimeMillis();
        System.out.println("consume time is:" + (end - start) + "毫秒");
    }

    private Moving moving;

    public AggregateProxyTank(Moving moving) {
        this.moving = moving;
    }
}
